package com.labor_management_system.Entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

/**
 * 
 * @TableName work_details
 */
@TableName(value ="work_details")
@Data
//工程明细
public class WorkDetails implements Serializable {
    /**
     * 
     */
    @TableId
    @JsonProperty("workDetailsId")
    private String workDetailsId;

    /**
     * 
     */
    @JsonProperty("laborEngineeringId")
    private String laborEngineeringId;

    /**
     * 
     */
    @JsonProperty("jobDescription")
    private String jobDescription;

    /**
     * 
     */
    @JsonProperty("measureUnit")
    private String measureUnit;

    /**
     * 
     */
    @JsonProperty("engineeringQuantity")
    private Double engineeringQuantity;

    /**
     * 
     */
    @JsonProperty("amountCompleted")
    private Double amountCompleted;

    /**
     * 
     */
    @JsonProperty("amountRemaining")
    private Double amountRemaining;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        WorkDetails other = (WorkDetails) that;
        return (this.getWorkDetailsId() == null ? other.getWorkDetailsId() == null : this.getWorkDetailsId().equals(other.getWorkDetailsId()))
            && (this.getLaborEngineeringId() == null ? other.getLaborEngineeringId() == null : this.getLaborEngineeringId().equals(other.getLaborEngineeringId()))
            && (this.getJobDescription() == null ? other.getJobDescription() == null : this.getJobDescription().equals(other.getJobDescription()))
            && (this.getMeasureUnit() == null ? other.getMeasureUnit() == null : this.getMeasureUnit().equals(other.getMeasureUnit()))
            && (this.getEngineeringQuantity() == null ? other.getEngineeringQuantity() == null : this.getEngineeringQuantity().equals(other.getEngineeringQuantity()))
            && (this.getAmountCompleted() == null ? other.getAmountCompleted() == null : this.getAmountCompleted().equals(other.getAmountCompleted()))
            && (this.getAmountRemaining() == null ? other.getAmountRemaining() == null : this.getAmountRemaining().equals(other.getAmountRemaining()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getWorkDetailsId() == null) ? 0 : getWorkDetailsId().hashCode());
        result = prime * result + ((getLaborEngineeringId() == null) ? 0 : getLaborEngineeringId().hashCode());
        result = prime * result + ((getJobDescription() == null) ? 0 : getJobDescription().hashCode());
        result = prime * result + ((getMeasureUnit() == null) ? 0 : getMeasureUnit().hashCode());
        result = prime * result + ((getEngineeringQuantity() == null) ? 0 : getEngineeringQuantity().hashCode());
        result = prime * result + ((getAmountCompleted() == null) ? 0 : getAmountCompleted().hashCode());
        result = prime * result + ((getAmountRemaining() == null) ? 0 : getAmountRemaining().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", workDetailsId=").append(workDetailsId);
        sb.append(", laborEngineeringId=").append(laborEngineeringId);
        sb.append(", jobDescription=").append(jobDescription);
        sb.append(", measureUnit=").append(measureUnit);
        sb.append(", engineeringQuantity=").append(engineeringQuantity);
        sb.append(", amountCompleted=").append(amountCompleted);
        sb.append(", amountRemaining=").append(amountRemaining);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}